package unit.data;

/**
 * Cообщение
 *
 * @author Yuri Denison
 * @since 07.08.11
 */
public abstract class Message {
    protected long time;
    protected String text;
    protected int senderId;
    protected int receiverId;
    protected boolean isDelivered;

    public Message(String text, int senderId, int receiverId) {
        this.text = text;
        this.senderId = senderId;
        this.receiverId = receiverId;
        isDelivered = false;
    }

    public long getTime() {
        return time;
    }

    public void setTime(long time) {
        this.time = time;
    }

    public String getText() {
        return text;
    }

    public int getSenderId() {
        return senderId;
    }

    public int getReceiverId() {
        return receiverId;
    }

    public boolean isDelivered() {
        return isDelivered;
    }

    public void setDelivered(boolean delivered) {
        this.isDelivered = delivered;
    }
}
